home *** CD-ROM | disk | FTP | other *** search
/ .net 1998 February / netCD41.iso / pc / DEMO16.DIR / Internal_1_movie script.ls < prev    next >
Encoding:
Text File  |  1997-12-08  |  1.8 KB  |  79 lines

  1. on startMovie
  2.   global pointCursor, gt
  3.   set pointCursor to [the number of member "pointer cursor", the number of member "pointer mask"]
  4.   if gt = 1 then
  5.     set the text of member "gtbanner" to "(Click on 'next' to continue with the guided tour)"
  6.   end if
  7. end
  8.  
  9. on stopMovie
  10. end
  11.  
  12. on keyDown
  13.   if the type of the member of sprite 36 = #digitalVideo then
  14.     set the movieRate of sprite 36 to 0
  15.   end if
  16.   repeat with n = 1 to 30
  17.     puppetSprite(n, 0)
  18.     set the cursor of sprite n to 0
  19.   end repeat
  20.   puppetSound(0)
  21.   go("start")
  22. end
  23.  
  24. on wait howlong
  25.   set currentTime to the timer
  26.   repeat while (currentTime + howlong) > the timer
  27.     nothing()
  28.   end repeat
  29. end
  30.  
  31. on waitforfade
  32.   wait(60)
  33. end
  34.  
  35. on click
  36.   puppetSound(2, "click")
  37.   updateStage()
  38.   updateStage()
  39.   wait(30)
  40. end
  41.  
  42. on clickFade
  43.   global gt
  44.   click()
  45.   set gt to 0
  46.   set the text of member "gtbanner" to EMPTY
  47.   set the cursor of sprite the clickOn to 0
  48.   puppetSprite(the clickOn, 0)
  49.   sound fadeOut 1, 60
  50. end
  51.  
  52. on clickFadeMovie
  53.   global gt
  54.   set the text of member "gtbanner" to EMPTY
  55.   set gt to 0
  56.   set the movieRate of sprite 36 to 0
  57.   clickFade()
  58. end
  59.  
  60. on MoveCursor targetH, targetV, timeLength
  61.   set rate to 16
  62.   set increments to float(timeLength) / float(60) * rate
  63.   puppetSprite(31, 1)
  64.   set startH to the locH of sprite 31
  65.   set startV to the locV of sprite 31
  66.   set incH to float(the locH of sprite 31 - targetH) / increments
  67.   set incV to float(the locV of sprite 31 - targetV) / increments
  68.   startTimer()
  69.   repeat with n = 1 to increments
  70.     set the locH of sprite 31 to startH - (incH * n)
  71.     set the locV of sprite 31 to startV - (incV * n)
  72.     updateStage()
  73.     wait((timeLength / increments * n) - the timer)
  74.   end repeat
  75.   set the locH of sprite 31 to targetH
  76.   set the locV of sprite 31 to targetV
  77.   puppetSprite(31, 0)
  78. end
  79.